package com.example.demo.mapper.user;


import com.example.demo.dto.user.reg.URegDto;
import com.example.demo.entity.user.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:龙宝
 * Date:2023-03-31
 * Time:18:38
 */
@Mapper
public interface StudentMapper {
    int reg(URegDto regDto);
    Student getStudentById(@Param("student_id") Integer student_id);
    //修改个人state以免多次恶意登录
    //更新state+unfreezingtime

    Student getStudentByCardId(String card_id);
    int upStudentState(Student student);

//    Student getStudentByName(@Param("username") String username);

    // 查询所有信息
    List<Student> getAllStudent();
    List<Student> getStudentByClassId(@Param("id") Integer id);
    List<Student> getStudentByMajor(@Param("major") String major);

//    List<Student> getStudent();
    //个人信息修改
    int updateStudentInfo(Student student);

    // 修改学生班级
    int updateStudentClassId(Integer student_id, Integer class_id);

}
